<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<meta HTTP-EQUIV="expires" CONTENT="0">
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragrma","no-cache");
response.setDateHeader("Expires",0);
%>
<title>物品种类管理</title>
<style type="text/css">

</style>
<script type="text/javascript" src="./js/head.js"></script>
</head>
<body>
	<div id="place" style="width: 100%;height: 100%;" oncontextmenu="return false">
		<div class="header">
			<h3>物品种类管理</h3>
			<img src='img/logo.png'>
		</div>
		<!-- ===========================================================主页面  -->
		<div v-show="pageA">
			<!-- ==============================================================查询条件 -->
			<div class="mt10 ml10 mr10 border" style="padding: 10px;">
				<div class="hand w200 lan">
					<i class="el-icon-caret-bottom"></i>物品种类列表
				</div>
				<!-- 列表展示 -->
				<div class="mt10">
					<el-table :data="tableData" border stripe style="width: 100%;" @selection-change="handleSelectionChange"><!-- -->
						<el-table-column type="selection" width="55"></el-table-column>
					    <el-table-column label="序号" head-align="center" align="center" type="index" width="100"></el-table-column>
					    <el-table-column prop="iname" label="名称" head-align="center" align="center" sortable show-overflow-tooltip></el-table-column>
					    <el-table-column prop="istatus" :formatter="statusFormat" label="状态" head-align="center" align="center" sortable show-overflow-tooltip></el-table-column>
					</el-table>
					
					<!-- bottons -->
					<div class="flex mt10">
						<el-button type="primary" size="mini" @click="add">新增</el-button>
						<el-button type="primary" size="mini" @click="update">修改</el-button>
						<el-button type="primary" size="mini" @click="del">删除</el-button>
					</div>
					
					<div class="flex wEnd mt10">
						<el-pagination @size-change="handleSizeChange"  @current-change="handleCurrentChange" :current-page="currPage"
					      :page-sizes="[10, 20, 30, 40]" :page-size="pageSize" :total="total"
					      layout="total, sizes, prev, pager, next, jumper">
		   				</el-pagination>
					</div>
					
				</div>
				
			</div>
		</div>
		<div v-show="pageB">
			<div class="border p10 m10">
				<div class="hand lan div_bottom">
					<i class="el-icon-caret-bottom"></i>录入
				</div>
				<el-form class="mt20" :model="model" :rules="modelRules" ref="modelRef" label-position="left" label-width="80px">
					<el-form-item label="名称" prop="iname">
					  <el-input v-model="model.iname" clearable :maxlength='50' class='w200'></el-input>
					</el-form-item>
					<el-input v-model="model.iid" clearable :maxlength='50' class='w200' v-show="false"></el-input>
					<el-input v-model="model.istatus" clearable :maxlength='50' class='w200' v-show="false"></el-input>
				</el-form>
				<div class="flex wCenter">
					<el-button type="primary" size="mini" @click="submit('modelRef')">提交</el-button>
					<el-button type="primary" size="mini" @click="back('modelRef')">返回</el-button>
				</div>
			</div>
		</div>		
	</div>
</body>
<script type="text/javascript" src="./js/type.js"></script>
</html>